import javax.swing.*;
import java.awt.event.*;

public class ShowDialogBox{
	JFrame frame;
	public static void main(String[] args){
		ShowDialogBox db = new ShowDialogBox();
	}

	public ShowDialogBox(){
		frame = new JFrame("Show the Message Dialog");
		JButton button = new JButton("Push me now!!");
		button.addActionListener(new MyAction());
		frame.add(button);
		frame.setSize(400, 100);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}

	public class MyAction implements ActionListener{
		public void actionPerformed(ActionEvent e){
			JOptionPane.showMessageDialog(frame,"http://coderstalk.blogspot.com");
		}
	}
}
